﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

using SMG.Domain.Specifications;
using SMG.Domain.Model.System;

namespace SMG.Domain.Specifications.System
{
    public class UserNameEqualsSpecification : Specification<User>
    {
        private readonly String _userName;

        public UserNameEqualsSpecification(String userName) {
            this._userName = userName;
        }

        public override Expression<Func<User, bool>> GetExpression()
        {
            return u => u.UserName == _userName;
        }
    }
}
